<template>
	<view class="content" @touchmove.prevent>
		<!-- 顶部导航栏组件 -->
		<view>
			<!-- 轮播图 -->
			<div class="banner">
				<div class="uview-banner">
					<u-swiper :list="homeData.banner" keyName="banner_image" height="540rpx"
						@click="onswiperclick"></u-swiper>
					<view class="postion">
						<u-navbar :title="titlename" :bgColor="navBgColor" :titleStyle="{ color: navColor }" fixed>
							<view slot="left"></view>
						</u-navbar>
					</view>
				</div>
				<!-- 通知公告 -->
				<view class="notice" v-if="text1.length>0">
					<view class="" v-if="homeData.notice_state == 1">
						<view class="" v-if="text1.length>1">
							<u-notice-bar :text="text1" direction="column" color="#ffffff" @click="openNotice"
								fontSize='14' bgColor="none"></u-notice-bar>
						</view>
						<view class="" v-else>
							<u-notice-bar :text="text1" direction="row" color="#ffffff" @click="openNotice"
								fontSize='14' bgColor="none"></u-notice-bar>
						</view>
					</view>
					<view class="" v-else>
						<view class="" v-if="text1.length>1">
							<u-notice-bar :text="text1" direction="column" color="#ffffff" bgColor="none"
								fontSize='14'></u-notice-bar>
						</view>
						<view class="" v-else>
							<u-notice-bar :text="text1" direction="column" color="#ffffff" bgColor="none"
								fontSize='14'></u-notice-bar>
						</view>
					</view>
				</view>
			</div>

			<view class="" style="position: absolute;right: 0rpx;top: 17vh;z-index: 999;" @click="onrili"
				v-if="infocapsule == 1">
				<image :src="banyuanxin" mode="" style="width: 82.66rpx;height: 124rpx;"></image>
			</view>
			<view class="contner">
				<view class=""
					style="padding: 0 20rpx;width: 100vw;height: auto;border-radius: 30rpx;background-color: #fff;display: flex;flex-direction: column;">
					<!-- 胶囊区幻灯片 -->
					<div class="capsule" :style="{ background: `url(${msg.url}) left top/100% 100% no-repeat` }"
						v-if="infocapsule == 2">
						<view class="capsule_s">
							<view class="capsule_top" @click="mingri">
								<view class="capsule_top_tex">
									明日之星
								</view>
								<view class="capsule_top_te">
									<image class="capsule_top_te_img" :src="icon1" mode=""></image>
									<view class="capsule_top_te_text">
										{{chname}}
									</view>
								</view>
							</view>
							<view class="capsule_bottom">
								<view class="capsule_bottom_jifen" @click="onClickTab()">
									<text class="capsule_bottom_jifen_text_1">积分:</text>
									<text class="capsule_bottom_jifen_text_2">{{jifen}}</text>
								</view>
								<view class="capsule_bottom_youhuiquan" @click="oncoupons()">
									<text class="capsule_bottom_jifen_text_3">优惠券:</text>
									<text class="capsule_bottom_jifen_text_4">{{wrtotalt}}</text>
								</view>
							</view>
						</view>
						<view class="capsule_x" @click="mingri">
							<image style="width: 280rpx;height: 220rpx;" :src="po40" mode=""></image>
						</view>
						<view class="capsule_guanbi" @click="offguanbi">
							<image style="width: 24rpx;height: 24rpx;" :src="zx15" mode=""></image>
							<view class="" style="color: #31A96D;font-size: 18rpx;margin-left: 10rpx;">
								点击收起
							</view>
						</view>
					</div>

					<view>
						<view class="market">
							<view class="market-left" @click="base_List(1)"
								:style="{ background: `url(${marketLeftImage}) left top/100% 100% no-repeat` }">
								<view class="market-left-text">
									订场
								</view>
								<view class="market-left-textww">
									购票
								</view>
								<view class="market-left-textww">
									办卡
								</view>
								<view class="market-left-text1">
									Booking
								</view>
								<view class="market-left-text2">
									Purchase Tickets
								</view>
								<view class="market-left-text2">
									Card Application
								</view>
							</view>
							<view class="market-right">

								<view class="item"
									:style="{ background: `url(${acimg2}) left top/100% 100% no-repeat` }"
									@click="base_List(3)">
									<text class="grid-text2">课程培训</text>
									<text class="grid-text22">Course</text>
									<text class="grid-text222">Training</text>
								</view>
								<!-- <view class="item"
									:style="{ background: `url(${acimg1}) left top/100% 100% no-repeat` }"
									@click="base_List(2)">
									<text class="grid-text1">票务服务</text>
									<text class="grid-text11">Ticket</text>
									<text class="grid-text111">Booking</text>
								</view> -->
								<!-- <view class="item"
									:style="{ background: `url(${acimg3}) left top/100% 100% no-repeat` }"
									@click="base_List(3)">
									<text class="grid-text3">赛事活动</text>
									<text class="grid-text33">Event</text>
									<text class="grid-text333">Activities</text>
								</view> -->
								<view class="item"
									:style="{ background: `url(${acimg3}) left top/100% 100% no-repeat` }"
									@click="base_List(2)">
									<text class="grid-text3">中甲购票</text>
									<text class="grid-text33">(主场赛事)</text>
									<!-- <text class="grid-text33">Event</text>
									<text class="grid-text333">Activities</text> -->
								</view>
								<view class="item"
									:style="{ background: `url(${acimg5}) left top/100% 100% no-repeat` }"
									@click="base_List(4)">
									<text class="grid-text3">苏体商业</text>
									<text class="grid-text33">SuTi</text>
									<text class="grid-text333">Commerce</text>
								</view>
								<view class="item"
									:style="{ background: `url(${acimg4}) left top/100% 100% no-repeat` }"
									@click="base_List(5)">
									<text class="grid-text4">积分商城</text>
									<text class="grid-text44">Points</text>
									<text class="grid-text444">Mall</text>
								</view>
							</view>
						</view>
					</view>

					<view style="height: auto;margin-bottom: 10rpx;" v-if="RaceProduct !=''">
						<view class="business" @click="base_List(2)" style="margin-top: 20rpx;margin-bottom: 10rpx;">
							<view class="business-title">
								<image :src="hangye" mode="" style="width: 170rpx;height: 49rpx;"></image>
							</view>
							<view class="news-list-more">
								<text>更多</text>
								<image style="width: 34rpx;height: 34rpx;" :src="jiantou11" mode=""></image>
							</view>
						</view>
						<scroll-view scroll-x>
							<view class="flex-align">
								<view v-for="(im,indexx) in RaceProduct" :key="indexx"
									style="margin-right: 20rpx;position: relative;width:460rpx;height: 280rpx;"
									@click="StoreDetaillists(im)">
									<image style="width:460rpx;height: 280rpx;" :src="im.withActivity.index_img"
										mode=""></image>
									<view
										style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;font-size: 24rpx;line-height: 50rpx;padding-left: 20rpx;
									margin-top: 10rpx;color: #FFFFFF;width:460rpx;background-color: rgba(0, 0, 0, 0.5);position: absolute;bottom: 0;height: 50rpx;z-index: 99;border-radius: 0 0 8rpx 8rpx;">
										{{im.race_name}}
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
					<!-- <view class="" style="position: fixed;right: 20rpx;top: 50vh;z-index: 99;" @click="onrili"
						v-if="infocapsule == 1">
						<image :src="zx7" mode="" style="width: 150rpx;height: 150rpx;"></image>
					</view> -->

					<!-- 活动日历  开始 -->
					<!-- <view class="" style="position: fixed;right: 20rpx;top: 60vh;z-index: 99;" @click="onrili"
						v-if="infocapsule == 1">
						<image :src="zx7" mode="" style="width: 150rpx;height: 150rpx;"></image>
					</view> -->
					<!-- <view class="business" style="margin-bottom: 10rpx;">
						<view class="business-title">
							<image :src="rili" mode="" style="width: 170rpx;height: 49rpx;"></image>
						</view>
						<view class="news-list-more">
							<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }" :bold="true">
							</u-icon>
						</view>
					</view>
					<attend-calendar :lateddates='lateddates' :truancyeddates='truancyeddates' :chidaodates='chidaodates'
						@on-click="handleChildClick">
					</attend-calendar> -->
					<!-- 活动日历  结束 -->

					<!-- <view class="business" @click="base_List(4)" v-if="RaceProduct != null">
						<view class="business-title">
							<image :src="huodong" mode="" style="width: 170rpx;height: 49rpx;"></image>
						</view>
						<view class="news-list-more">
							<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }" :bold="true">
							</u-icon>
						</view>
					</view> -->

					<!-- 热门活动  1个  开始-->
					<!-- 一个子场馆以上  style 1-->
					<!-- <view class="footer-4" v-if="RaceProduct != null">
						<view class="flex-align">
							<view @click="StoreDetaillists(im)">
								<view class="" style="width: 100%;height: 270rpx;">
									<u--image :src="RaceProduct.withActivity.race_img" radius="7" width="710rpx"
										height="270rpx"></u--image>
								</view>
								<view class="flex-space-between" style="margin-top: 20rpx;padding: 0 20rpx ;">
									<view class="footer-biaoti">
										{{RaceProduct.race_name}}
									</view>
									<view class="footer-jiage">
										¥{{RaceProduct.price_selling}}<text class="footer-qi">起</text>
									</view>
								</view>
					
								<view class="footer-riqi">
									{{RaceProduct.display_start}} - {{RaceProduct.display_end}}
								</view>
							</view>
						</view>
					</view> -->
					<!-- 热门活动  1个 结束-->

					<!--新 热门课程  开始-->
					<view style="height: auto;" v-if="TrainProduct!=''">
						<view class="business" @click="base_List(3)" style="margin-top: 20rpx;margin-bottom: 10rpx;">
							<view class="business-title">
								<image :src="jiaopai" mode="" style="width: 170rpx;height: 49rpx;"></image>
							</view>
							<view class="news-list-more">
								<text>更多</text>
								<image style="width: 34rpx;height: 34rpx;" :src="jiantou11" mode=""></image>
								<!-- <u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }"
									:bold="true">
								</u-icon> -->
							</view>
						</view>
						<view class="" style="display: flex;flex-direction: column;margin-bottom: 20rpx;">
							<view class=""
								style="width: 710rpx;height: 250rpx;display: flex;flex-direction: row;align-items: center;margin-top: 10rpx;margin-bottom: 10rpx;"
								v-for="(im,indexx) in TrainProduct" :key="indexx" @click="StoreDetaillist(im)">
								<view class="">
									<image style="width: 210rpx;height: 250rpx;border-radius: 12rpx;" :src="im.cover"
										mode=""></image>
								</view>
								<view class="" style="width: 500rpx;height: 210rpx;background: #EDF5F1;">
									<view class="footer-xxq">{{im.name}}</view>
									<view class="footer-xxw">{{im.display_start}} - {{im.display_end}}</view>
									<view
										style="display: flex;flex-direction: row;	margin-top: 10rpx;padding-left: 20rpx;">
										<!-- <view style="width: 80rpx;height: 34rpx;background: #DBDEE0;border-radius: 8rpx;font-size: 22rpx;line-height: 34rpx;text-align: center;">江苏省</view> -->
										<view
											style="width: 326rpx;font-size: 22rpx;color: #A6A6A6;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;">
											{{im.address}}
										</view>
									</view>
									<view class="footer-xxr" style="">
										<text class="footer-xxr1" style="color: #4BA677;">¥{{im.price_selling}}</text>
										<text class="footer-xxr2" style="margin-left: 6rpx;">起</text>
									</view>
								</view>
							</view>
						</view>

					</view>
				</view>
				<!-- 新 热门课程  结束-->
				<!-- 热门课程  开始-->
				<view>
					<!-- <view v-if="TrainProduct.length">
						<view class="business" @click="base_List(3)" style="margin-top: 10rpx;">
							<view class="business-title">
								<image :src="jiaopai" mode="" style="width: 170rpx;height: 49rpx;"></image>
							</view>
							<view class="news-list-more">
								<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }"
									:bold="true">
								</u-icon>
							</view>
						</view>
						<view class="footer-3" style="padding: 0 0 10rpx 0rpx;">
							<view class="flex-align">
								<view v-for="(im,indexx) in TrainProduct" :key="indexx" @click="StoreDetaillist(im)"
									class="footer_peix">
									<view class="">
										<view class="footer-x">
											<image class="footer-xx" :src="im.cover" mode=""></image>
										</view>
										<view class="footer-xxq">{{im.name}}</view>
										<view class="footer-xxw">{{im.display_start}} - {{im.display_end}}</view>
										<view class="footer-xxr" style="">
											<text class="footer-xxr1">¥{{im.price_selling}}</text> <text
												class="footer-xxr2">起</text>
										</view>
									</view>
									<view class="" style="width: 20rpx;height: 360rpx;"></view>
								</view>
							</view>
						</view>
					</view> -->
					<!-- 热门课程  结束-->


					<!-- 活动资讯 -->
					<!-- <view style="height: auto;">
						<view class="business" @click="goNewsList" style="margin-top: 20rpx;">
							<view class="business-title">
								<image :src="hangye" mode="" style="width: 170rpx;height: 49rpx;"></image>
							</view>
							<view class="news-list-more">
								<u-icon name="arrow-right" :customStyle="{ color: 'rgb(190,190,190) !important' }"
									:bold="true">
								</u-icon>
							</view>
						</view>
						<view class="news-list">
							<view class="news-list_lap">
								<view class="new-item" v-for="(item, index) in newsList" :key="index"
									@click="goNewsDetail(item.id)">
									<view class="new-item_add">
										<view class="new-item-left">
											<view class="new-item-title">
												<view class="">
													<text class="new-item-title-1" v-if="index == 0">头条</text>
													<text class="new-item-title-2">{{item.name}}</text>
												</view>
											</view>
											<view class="new-item-center">
												<u--text :text="item.remark" lines="2" color="rgb(190,190,190)"
													size="22rpx"></u--text>
											</view>
											<view class="new-item-time">
												<image :src="building" mode="" style="width: 20rpx;height: 20rpx;">
												</image>
												<text
													style="font-size: 22rpx;color: #A6A6A6;margin-left: 10rpx;">{{item.sender}}</text>
												<text class="new-item-time-line">|</text>
												<image :src="building" mode=""
													style="width: 20rpx;height: 20rpx;margin-left: 10rpx;"></image>
												<text
													style="font-size: 22rpx;color: #A6A6A6;margin-left: 10rpx;">{{item.create_at}}</text>
											</view>
										</view>
										<view class="new-item-right">
											<u--image :src="item.cover" width="290rpx" height="210rpx" radius='10rpx'
												:showMenuByLongpress="false">
											</u--image>
										</view>
									</view>
									<view class=""
										style="width: 710rpx;height: 1rpx;border: 1rpx solid #f4f4f4;margin-top: 20rpx;">
									</view>
								</view>
							</view>
						</view>
					</view> -->
					<!-- <swiper class="swiper" vertical circular :autoplay="autoplay" :interval="interval"
						:duration="duration">
						<swiper-item>
							<image
								src="https://suwentou.doit10019.com/upload/53/6346500fb8e0e1851b0137fbda37de.png?attname=yy.png"
								mode="" style="width: 100%;height: 300rpx;">
							</image>
						</swiper-item>
						<swiper-item>
							<image
								src="https://suwentou.doit10019.com/upload/53/6346500fb8e0e1851b0137fbda37de.png?attname=yy.png"
								mode="" style="width: 100%;height: 300rpx;">
							</image>
						</swiper-item>
						<swiper-item>
							<video style="width: 100%;height: 300rpx;"
								src="https://oss.szsportscenter.cn/img/kedaibiaoship.mp4" @error="videoErrorCallback"
								enable-play-gesture auto-pause-if-navigate controls vslide-gesture></video>
						</swiper-item>
					</swiper> -->
					<!-- <u-swiper :list="list3333" previousMargin="30" nextMargin="30" circular :autoplay="true"
						radius="5" bgColor="#ffffff"></u-swiper> -->
					<!-- <u-swiper :list="list3333" keyName="image" showTitle :autoplay="true" circular></u-swiper> -->
					<view class="shangwu">
						<view style="font-size: 30rpx;">
							商务合作：{{homeData.business_company?homeData.business_company:''}}
						</view>
						<view @click="on_phone1">
							订场购票：{{homeData.rent?homeData.rent:''}}
						</view>
						<view @click="on_phone2">
							培训中心：{{homeData.train?homeData.train:''}}
						</view>
						<view @click="on_phone3">
							赛演租场：{{homeData.race_show?homeData.race_show:''}}
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- <van-swipe vertical :autoplay="3000" :height="200" style="height: 200px;">
		  <van-swipe-item default="2">1</van-swipe-item>
		  <van-swipe-item default="2">2</van-swipe-item>
		  <van-swipe-item default="2">3</van-swipe-item>
		  <van-swipe-item default="2">4</van-swipe-item>
		</van-swipe> -->
		<u-popup @touchmove.stop :show="showInfo" @close="closeInfo" closeOnClickOverlay mode="bottom" round="15">
			<view class="store-popup">
				<view class="title flex-between">
					<text></text>
					<u-icon @click="closeInfo" name="close" color="#000000" size="18"></u-icon>
				</view>
				<div class="cap_sule" :style="{ background: `url(${msg.url}) left top/100% 100% no-repeat` }">
					<view class="capsule_s">
						<view class="capsule_top">
							<view class="capsule_top_tex">
								明日之星
							</view>
							<view class="capsule_top_te">
								<image class="capsule_top_te_img" :src="icon1" mode=""></image>
								<view class="capsule_top_te_text">
									{{chname}}
								</view>
							</view>
						</view>
						<view class="capsule_bottom">
							<view class="capsule_bottom_jifen">
								<text class="capsule_bottom_jifen_text_1">积分:</text>
								<text class="capsule_bottom_jifen_text_2">{{jifen}}</text>
							</view>
							<view class="capsule_bottom_youhuiquan">
								<text class="capsule_bottom_jifen_text_3">优惠券:</text>
								<text class="capsule_bottom_jifen_text_4">{{wrtotalt}}</text>
							</view>
						</view>
					</view>
					<view class="capsule_x">
						<image style="width: 280rpx;height: 220rpx;" :src="po40" mode=""></image>
					</view>
				</div>
				<view class="" style="padding: 30rpx 16vw 10rpx 16vw;">
					<u-sticky>
						<u-tabs :list="list1" :activeStyle="{  color: '#4BA677 ',fontWeight: 'bold', }"
							:inactiveStyle="{color: '#666666',}" lineColor="#4BA677"
							itemStyle="padding-left: 15px; padding-right: 15px; height: 38px;" :current="currentTab"
							@click=" tabClick"></u-tabs>
					</u-sticky>
				</view>
				<!-- 皮肤 -->
				<view class="cap_daren" v-if="currentTab == 0">
					<view class="cap_pifu" v-for="(item,index) in list4">
						<view class="cap_pifu1">
							<image style="width: 305rpx;height: 93.01rpx;" :src="item.bg_image_url" mode=""></image>
						</view>
						<view class="cap_pifu3" v-if="item.person_set_count == 0" @click="onpifu(item,index)">
							装扮
						</view>
						<view class="cap_pifu33" v-else>
							已装扮
						</view>
					</view>
				</view>
				<!-- 挂件 -->
				<view class="cap_daren" v-if="currentTab == 1">
					<view class="cap_guajian" v-for="(item,index) in list2">
						<view class="cap_guajian1">
							<image style="width: 160rpx;height: 160rpx;" :src="item.bg_image_url" mode=""></image>
						</view>
						<!-- <view class="cap_guajian2">
							羽毛球达人
						</view> -->
						<view class="cap_guajian3" v-if="item.person_set_count == 0" @click="onguajian(item,index)">
							装扮
						</view>
						<view class="cap_guajian33" v-else>
							已装扮
						</view>
					</view>
				</view>
				<!-- 称号 -->
				<view class="cap_daren" v-if="currentTab == 2">
					<view class="cap_xunhuan" v-for="(item,index) in list3">
						<view class="cap_xunhuan1">
							<image style="width: 60rpx;height: 60rpx;border-radius: 50%;" :src="item.bg_image_url"
								mode=""></image>
						</view>
						<view class="cap_xunhuan2">
							{{item.name}}
						</view>
						<view class="cap_xunhuan3" v-if="item.person_set_count == 0" @click="onchenghao(item,index)">
							装扮
						</view>
						<view class="cap_xunhuan33" v-else>
							已装扮
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<u-popup @touchmove.stop :show="riliInfo" @close="closerili" closeOnClickOverlay mode="bottom" round="15">
			<view class="store-popup" style="height: 42vh;background-color: #EDF5F5;">
				<view class="title flex-between">
					<text></text>
					<u-icon @click="closerili" name="close" color="#000000" size="18"></u-icon>
				</view>
				<scroll-view scroll-y="true" class="scrolladd" style="height: 38vh;">
					<view class=""
						style="display: flex;justify-content: center;flex-direction: column;align-items: center;width: 100%;">
						<view class="data-item" @click="ondatalist4(item, index)" v-for="(item,index) in ByDaydates"
							:key="index">
							<view class="" style="display: flex;flex-direction: column;">
								<view class="image">
									<u--image :src="item.withActivity.race_img" width="100%" height="220rpx"
										radius="7"></u--image>
								</view>
								<view class="detail">
									<view>
										<view class=" ellipsis-1">
											<text>
												{{item.withActivity.race_name?item.withActivity.race_name:''}}</text>
										</view>
										<view class="tag-list flex-align"
											style="font-size: 26rpx;margin-top: 20rpx;color: #999999;">
											{{item.display_start?item.display_start:''}} -
											{{item.display_end?item.display_end:''}}
										</view>
									</view>
									<view class="flex-between">
										<view class="" style="font-size: 26rpx;color: #999999;">
											{{item.withActivity.subtitle?item.withActivity.subtitle:''}}
										</view>
										<!-- <view class="price">¥640.00起</view> -->
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- <view v-if="products.length === 0" style="position: absolute;top: 200rpx; left: 30%;">
						<u-empty mode="list" text="暂无类目,看看其他商品吧~" :icon="icon1">
						</u-empty>
					</view> -->
				</scroll-view>
			</view>
		</u-popup>

		<view class="" v-if="dialog_state == 1">
			<view v-if="gonggao"
				style="width: 100%; min-height: 100%;background-color:rgba(0, 0, 0, 0.6);  position: fixed;top:0;left:0;z-index: 999999999;">
			</view>
			<view v-if="gonggao" :style="{ background: `url(${beijing}) left top/100% 100% no-repeat` }" style="width: 80%; min-height: 1000rpx;
				<!-- background-size: 100% 100%;position: fixed;top:300rpx;left:10%;z-index: 10000000000;" >  <!-- onweixin -->
				<view class="" style="color: #FFFFFF;text-align: center;margin-top: 20rpx;">
					{{homeData.name}}
				</view>
				<scroll-view scroll-y
					style="width: 100%;height: 740rpx;padding: 35rpx 35rpx 20rpx 35rpx;margin-top: 90rpx;">
					<u-parse :content="homeData.index_dialog.content"></u-parse>
				</scroll-view>
				<view class="" style="display: flex;justify-content: center;align-items: center;" @click="onlink()" v-if="btn_left_sure == 0">
					<view style="width: 380rpx; height: 80rpx;background-image: url('https://oss.szsportscenter.cn/img/zhidaol.png');
				background-size: 100% 100%;text-align: center;line-height: 80rpx;color: #fff;margin-bottom: 45rpx;">
						了解详情
					</view>
				</view>
				<view class="" style="display: flex;align-items: center; justify-content: space-around; "  v-if="btn_left_sure == 1">					<view						style="width: 43%; height: 80rpx;background: linear-gradient( 270deg, #57C08B 0%, #69D1A4 100%);					background-size: 100% 100%;text-align: center;line-height: 80rpx;color: #fff;margin-bottom: 45rpx;border-radius: 80rpx;"						@click="onClickMenu1()">						{{btn_left}}					</view>					<view						style="width: 43%; height: 80rpx;background: linear-gradient( 270deg, #57C08B 0%, #69D1A4 100%);					background-size: 100% 100%;text-align: center;line-height: 80rpx;color: #fff;margin-bottom: 45rpx;border-radius: 80rpx;"						@click="onlink()">						{{btn_right}}					</view>				</view>
				<!-- <view class="" style="display: flex;justify-content: center;align-items: center;">
					<view @click="offxieyi" style="width: 380rpx; height: 80rpx;background-image: url('https://oss.szsportscenter.cn/img/zhidaol.png');
				background-size: 100% 100%;text-align: center;line-height: 80rpx;color: #fff;margin-bottom: 45rpx;">
						知道了
					</view>
				</view> -->
			</view>
			<view style="position: fixed;top: 250rpx;right: 5%;z-index: 10000000000;" v-if="gonggao">
				<u-icon @click="offxieyi" name="close-circle-fill" color="#ffffff" size="26"></u-icon>
			</view>
		</view>


		<view class="" v-if="ggtp">
			<view v-if="ggtp"
				style="width: 100%; min-height: 100%;background-color:rgba(0, 0, 0, 0.5);  position: fixed;top:0;left:0;z-index: 999;">
			</view>
			<view v-if="ggtp"
				style="width: 100%; min-height: 100%;background-color:rgba(0, 0, 0, 0.4);  position: fixed;top:0;left:0;z-index: 1000;display: flex;flex-direction: column; align-items: center;justify-content: center;">
				<image style="width: 400rpx;height: 600rpx;" src="https://oss.szsportscenter.cn/img/goumaixuzhi.png"
					mode=""></image>
				<view class="" style="display: flex;justify-content: center;align-items: center;margin-top: 40rpx;">
					<view @click="offxieyi" style="width: 380rpx; height: 80rpx;background-image: url('https://oss.szsportscenter.cn/img/zhidaol.png');
				background-size: 100% 100%;text-align: center;line-height: 80rpx;color: #fff;">
						知道了
					</view>
				</view>
			</view>
		</view>

		<u-popup border-radius="14" mode='center' :mask-close-able="false" :closeable="false" :show="showPopup">
			<view class="not-logged-in">
				<view class="title">授权小程序</view>
				<u-image width="113" height="90" :src="logosrc" v-if="logosrc!=''"></u-image>
				<u-image width="113" height="90" :src="icon2" v-else></u-image>
				<view class="desc">需要手机号授权登录</view>
				<view class="btns">
					<button class="btn2" @click="cancelogin">取消授权</button>
					<button class="btn" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">立即授权</button>
				</view>
			</view>
		</u-popup>


		<u-action-sheet :actions="phonelist" :closeOnClickAction="true" @close="phoneclose" :title="title"
			:safeAreaInsetBottom="true" :show="phoneShow" @select="selectClick"></u-action-sheet>
		<!-- 底部导航组件 -->
		<tabber :active="0"></tabber>
	</view>
</template>

<script>
	// import attendCalendar from '@/components/attend-calendar/attend-calendar';
	import QSNavbar from "@/components/QS-Navbar/QS-Navbar.vue";
	// import goodsSwiper from "@/components/pyh-goodsSwiper/pyh-goodsSwiper.vue";
	const index = require("@/api/index/index.js");
	const personal = require('@/api/personal/index.js');
	const subscribe = require('@/api/subscribe/index.js');
	const market = require("@/api/market/index.js");
	const venues = require("@/api/venues/venues.js");
	export default {
		components: {
			QSNavbar,
			// goodsSwiper,
			// attendCalendar,
		},
		data() {
			return {
				icon2: this.$https.assetsPath + 'db34b1cd242d406763397f09ca0aa8e2371b81d4.png',
				// lateddates: ["2024-5-25"],
				chidaodates: [],
				truancyeddates: ['2024-5-25', '2024-6-18', '2024-6-20'],
				showInfo: false,
				// icon1: this.$https.assetsPath + '44442ab00fdb9f844c2bd55c56911337beca8361.png',
				icon1: '',
				navBgColor: 'rgba(255, 255, 255, 0)',
				navColor: '#FFFFFF',
				jiaopai: this.$https.assetsPath + 'img122.png',
				huodong: this.$https.assetsPath + '38083cff51de8b66fb86bb0fb2f1b9a46f2932a1.png',
				hangye: this.$https.assetsPath + 'img123.png',
				rili: this.$https.assetsPath + 'zx14.png',
				zx7: this.$https.assetsPath + 'zx7.png',
				banyuanxin: this.$https.assetsPath + 'banyuanxin.png',
				zx15: this.$https.assetsPath + 'zx26.png',
				msg: {
					// url:this.$https.assetsPath + '1995ac5a95a34ca83021df6e6535ed35c0a9b4de.png',
					url: '',
				},
				po32: this.$https.assetsPath + 'po32.png',
				po20: this.$https.assetsPath + 'po20.png',
				po13: this.$https.assetsPath + 'po13.png',
				// po40: this.$https.assetsPath + 'po40.png',
				po40: '',
				scene: "",
				movHeight: '205rpx', //卡片高度
				lastDataList: [],
				text1: [],
				address: {
					name: "",
					city: "",
					province: "",
				},
				newsDemoImage: this.$https.assetsPath + "09d9c9e3c595db3dfd06919727d6db8ed9c771c5.png",
				building: this.$https.assetsPath + "48c89be73bd5b5100d62d9e224efd88047b262fa.png",
				config: {
					autoplay: true,
					interval: 1000,
					multiple: 2.58,
				},
				detail: {
					title: "",
					list: [],
					tabList: [], //图标菜单
					hiddenTab: false, //隐藏tab
				},
				more: this.$https.assetsPath + "66bd2432e846ed909c5773c2448c4e356fea5568.png",
				activityRightImage: [
					this.$https.assetsPath + "a6895fbcbffac19df0154b6239a280c4b996015c.png",
					this.$https.assetsPath + "038eb14a1d3281c88fc979d00ec3987597941ed6.png",
				],
				activityLeftImage: this.$https.assetsPath + "d910a9a70e119605704470efc39b8a850740f8da.png",
				acimg1: this.$https.assetsPath + "img115.png",
				acimg2: this.$https.assetsPath + "img117.png",
				// acimg3: this.$https.assetsPath + "img116.png",
				acimg3: 'https://oss.szsportscenter.cn/upload/35/b543e71cb9fc02953fb9b0f8c2b71c.jpg?attname=2001.jpg',
				acimg5: 'https://oss.szsportscenter.cn/upload/79/4a701983b38edd1d9a539aea52cfd0.png?attname=suti.png',
				acimg4: this.$https.assetsPath + "img118.png",
				jiantou11: this.$https.assetsPath + "jiantou11.png",

				// marketLeftImage: this.$https.assetsPath + "baf8211ce23662ee4ee217cea465628a00e79d40.png",
				marketLeftImage: this.$https.assetsPath + "img114.png",

				src: "https://cdn.uviewui.com/uview/album/1.jpg",
				navbarItems_1: [{
					type: "",
					icon: "back",
					layout: "center",
					width: 15,
					doEvent: "back",
					iconColor: "#fff",
				}, {
					layout: "right",
					type: "text",
					text: "",
					width: 50,
					weight: "bold",
					color: "#fff",
				}, ],
				homeData: {},
				tabbar_index: 0, // 底部导航默认选中
				newsList: [],
				options: {},
				page_url: '/pages/index/index',
				Homelist: [],
				jifen: 0,
				TrainProduct: [],
				RaceProduct: [],
				titlename: '',
				list1: [{
						name: "皮肤"
					},
					{
						name: "挂件"
					},
					{
						name: "称号"
					}
				],
				currentTab: 0,
				list2: [],
				list3: [],
				list4: [],
				gjindex: 0,
				chindex: 0,
				pfindex: 0,
				chname: '',
				venues_id: '',
				cardtype: 1,
				wrtotalt: 0,
				infocapsule: 2,
				riliInfo: false,
				ByDaydates: [],
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				list3333: [{
					image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					title: '昨夜星辰昨夜风，画楼西畔桂堂东',
				}, {
					image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
					title: '身无彩凤双飞翼，心有灵犀一点通'
				}, {
					image: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
					title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
				}],
				gonggao: true,
				ggtp: false,
				beijing: '',
				dialog_state: 0,
				phoneShow: false,
				phonelist: [{
					name: ''
				}],
				title: '拨号',
				loginCode: "",
				showPopup: false,
				logosrc: uni.getStorageSync("heading"),
				ticketproducts: [],
				openid: '',				mchId: '1489203282',				memberStatus: "1",
				btn_left_sure: "",
				btn_right: "",
				btn_left: "",
			};
		},
		computed: {
			filterTab() {
				if (this.detail.hiddenTab) {
					let data = this.detail.tabList.slice(0, 4);
					data.push({
						icon: this.$https.assetsPath +
							"6bdbf4f1d1e68a2f393b2e9392d4ebf3c38d1356.png",
						name: "更多",
						id: -1,
					});
					return data;
				} else {
					return this.detail.tabList;
				}
			},
		},
		onLoad(options) {
			// 手机号码授权
			let that = this
			uni.login({
				success(res) {
					that.loginCode = res.code
				}
			})
			let phone = uni.getStorageSync('phone')
			if (!phone) {
				this.showPopup = false
			} else {
				this.showPopup = false
			}

			this.options = options
			// 二维码用户openid
			const scene = decodeURIComponent(options.scene)
			this.scene = scene
			uni.setStorageSync('codescene', scene)
			uni.setStorageSync('openidlist', options.openidlist)
			if (uni.getStorageSync('infocapsule')) {
				this.infocapsule = uni.getStorageSync('infocapsule')
			}
			// 获取页面设置配置
			// wx.setVisualEffectOnCapture({
			//   visualEffect: 'hidden',
			//   success:(res) => {
			//     console.log(res)
			//   },
			//   fail:(err) => {
			//     console.log(err)
			//   },
			//   complete:(res) => {
			//     console.log(res)
			//   }
			// })
			// wx.onUserCaptureScreen(function (res) {
			//   console.log('用户截屏了')
			// })


		},
		onShow() {
			//防录屏/截屏
			// #ifdef MP-WEIXIN
			// if (wx.setVisualEffectOnCapture) {
			// 		wx.setVisualEffectOnCapture({
			// 		visualEffect: 'hidden',
			// 		success: (res)=>{
			// 			console.log('success',res);
			// 			}
			// 		})
			// }
			// #endif

			const _this = this;
			// 获取学员资料
			let params = {
				app_id: this.$https.weixinAppId,
			}
			personal.getProjectIdByAppId(params).then(result => {
				getApp().globalData.projectId = result.data.result
				getApp().globalData.sign = result.data.sign;
				let that = this;
				// if (uni.getStorageSync("tarbar_inx1")) {
				// 	that.tabbar_index = uni.getStorageSync("tarbar_inx1");
				// }
				// 查询对应小程序的配置信息
				that.getAppletConfig();
				that.getPoints()
				// that.getNewsList();  咨询
				that.getLocation();
				that.getMyCoupon()
				// that.get_component()
				// that.getOrderFive()
				// that.getTrainProductByHot()
				// that.getRaceProductByHot()
			})
		},

		// onUnload(){
		// 	// #ifdef MP-WEIXIN
		// 	if (wx.setVisualEffectOnCapture) {
		// 			wx.setVisualEffectOnCapture({
		// 			visualEffect: 'none',
		// 			success: (res)=>{
		// 			}
		// 		})
		// 	}
		// 	// #endif
		// },

		methods: {
			onClickMenu1() {				if (!uni.getStorageSync("openid")) {					uni.showToast({						title: '请先登录！',						icon: 'none',						duration: 1000					});
					this.showPopup = true
					this.gonggao = false				} else {					uni.navigateTo({						url: `plugin://myPlugin/index?openid=${uni.getStorageSync('openid')}&mch_id=${this.mchId}&member_status=${this.memberStatus}&card_open_nav=default`					})				}			},
			onweixin(){
				console.log(this.homeData.index_dialog)
				if( this.homeData.index_dialog.link_url !=''){
					wx.navigateToMiniProgram({
						shortLink: this.homeData.index_dialog.link_url,
						envVersion: 'release', // 根据目标环境选择 develop/trial/release
						success(res) {
							console.log("跳转成功");
						}
					});
				}
				
			},
			onGetPhoneNumber(e) {
				var _this = this
				if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
					uni.showToast({
						title: '获取用户信息失败',
						icon: 'none', //如果要纯文本，不要icon，将值设为'none'
						duration: 2000 //持续时间为 2秒
					})
				} else {
					// 获取手机号并解密
					uni.checkSession({
						success() {
							// session未过期,并且在本生命周期一直有效 (这里可以不写代码)
						},
						fail() {
							// session_key已失效,需要重新登录流程并更新code
							uni.login({
								success(res) {
									_this.loginCode = res.code
								}
							})
						},
						complete() {
							// 将code,iv,encryptedData传给后端进行解密
							let params = {
								appid: _this.$https.weixinAppId,
								encryptedData: e.detail.encryptedData,
								iv: e.detail.iv,
								code: _this.loginCode,
								project_id: getApp().globalData.projectId,
								references: uni.getStorageSync("openidlist"),
								invite_code: uni.getStorageSync("codescene") //二维码用户openid
							}
							_this.appletPhoneLogin(params)
						}
					})

				}
			},
			cancelogin() {
				this.showPopup = false
			},
			async appletPhoneLogin(params) {
				let that = this
				let data = params
				let result = await personal.appletPhoneLogin(data)
				if (result.code == 1) {
					uni.setStorageSync('phone', result.data.phone)
					uni.setStorageSync('openid', result.data.openid)
					that.showPopup = false
					that.getAppletConfig();
					that.getPoints()
					that.getLocation();
					that.getMyCoupon()
					this.gonggao = true
				} else {
					uni.showToast({
						icon: 'none',
						mask: true,
						title: '授权失败，请稍后再试'
					})
				}
			},
			on_phone1() {
				this.phoneShow = true
				this.phonelist[0].name = this.homeData.rent
			},
			on_phone2() {
				this.phoneShow = true
				this.phonelist[0].name = this.homeData.train
			},
			on_phone3() {
				this.phoneShow = true
				this.phonelist[0].name = this.homeData.race_show
			},
			phoneclose() {
				this.phoneShow = false
			},
			selectClick() {
				uni.makePhoneCall({
					phoneNumber: this.phonelist[0].name
				})
			},
			gophone() {
				uni.makePhoneCall({
					phoneNumber: this.phonelist[0].name
				})
			},
			// 关闭弹窗
			offxieyi() {
				this.gonggao = false,
					this.ggtp = false
				uni.setStorageSync("dialog_state", 2)
				this.dialog_state = uni.getStorageSync('dialog_state')
			},
			onlink(){
				const clickeddialog = this.homeData.index_dialog;
				// 输出参数对象到控制台，或者进行其他操作
				console.log(clickeddialog.link_url);
				if (clickeddialog.link_type == 1) {
					//  ==== 跳转外链  开始
					if (clickeddialog.link_url != '') {
						uni.navigateTo({
							url: '/page_find/webview1?outside_link_url=' + clickeddialog.link_url
						})
					}
					//  ==== 跳转外链  结束
				} else if (clickeddialog.link_type == 2) {
					if (clickeddialog.link_url != '') {
						let url = clickeddialog.link_url
						uni.navigateTo({
							url: url
						})
					}
				} else if (clickeddialog.link_type == 3) {
					wx.navigateToMiniProgram({
						shortLink: clickeddialog.link_url,
						envVersion: 'release', // 根据目标环境选择 develop/trial/release
						success(res) {
							console.log("跳转成功");
						}
					});
				}else if (clickeddialog.link_type == 0) {
					this.gonggao = false
				}
			},
			onswiperclick(index) {
				const clickedBanner = this.homeData.banner[index];
				// 输出参数对象到控制台，或者进行其他操作
				console.log(clickedBanner.link_url);
				if (clickedBanner.link_type == 1) {
					//  ==== 跳转外链  开始
					if (clickedBanner.link_url != '') {
						uni.navigateTo({
							url: '/page_find/webview1?outside_link_url=' + clickedBanner.link_url
						})
					}
					//  ==== 跳转外链  结束
				} else if (clickedBanner.link_type == 2) {
					if (clickedBanner.link_url != '') {
						let url = clickedBanner.link_url
						uni.navigateTo({
							url: url
						})
					}
				} else if (clickedBanner.link_type == 3) {
					wx.navigateToMiniProgram({
						shortLink: clickedBanner.link_url,
						envVersion: 'release', // 根据目标环境选择 develop/trial/release
						success(res) {
							console.log("跳转成功");
						}
					});
				}
			},
			closerili() {
				this.riliInfo = false
			},
			// 点击展示关闭
			onrili() {
				this.infocapsule = 2
				uni.setStorageSync('infocapsule', this.infocapsule)
				this.infocapsule = uni.getStorageSync('infocapsule')
			},
			offguanbi() {
				this.infocapsule = 1
				uni.setStorageSync('infocapsule', this.infocapsule)
				this.infocapsule = uni.getStorageSync('infocapsule')
			},
			// 日历点击
			handleChildClick(date) {
				console.log('父组件收到子组件的点击事件，日期为:', date);
				this.riliInfo = true
				this.getRaceByDay(date)
			},
			onClickTab() {
				wx.navigateToMiniProgram({
					appId: 'wx1581663debd273d5',
					// path: 'pages/pointDetail/pointDetail',
					path: 'pages/memberCenter/memberCenter',
					extraData: {
						// 可选，传递给目标小程序的数据，具体格式自定义
					},
					envVersion: 'release', // 可选，跳转到目标小程序的版本，可选值为 develop（开发版）、trial（体验版）、release（正式版）
					success(res) {
						// 跳转成功的回调
					},
					fail(err) {
						// 跳转失败的回调
					}
				});
			},
			oncoupons() {
				uni.navigateTo({
					url: '/pages_a/coupons/coupons'
				})
			},
			closeInfo() {
				this.showInfo = false;
			},
			// 首页培训购买产品展示
			async getTrainProductByHot() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					shop_id: that.homeData.venue

				};
				let result = await index.getTrainProductByHot(data);
				if (result.code == 1) {
					this.TrainProduct = result.data
				}
			},
			// 首页活动购买产品展示
			async getRaceProductByHot() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					shop_id: that.homeData.venue
				};
				let result = await index.getRaceProductByHot(data);
				if (result.code == 1) {
					this.RaceProduct = result.data
				}
			},
			// 日历活动时间
			async getRaceDate() {
				let that = this;
				let postData = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					shop_id: that.homeData.venue,
				}
				let res = await index.getRaceDate(postData)
				if (res.code == 1) {
					const dates = res.data.hot //hot 热门活动
					const array1 = dates.map(date => {
						const parts = date.split('-');
						if (parts[1].startsWith('0')) {
							parts[1] = parseInt(parts[1], 10);
						}
						if (parts[2].startsWith('0')) {
							parts[2] = parseInt(parts[2], 10);
						}
						return parts.join('-');
					});

					const date_s = res.data.normal //normal 普通活动
					const array2 = date_s.map(date => {
						const parts = date.split('-');
						if (parts[1].startsWith('0')) {
							parts[1] = parseInt(parts[1], 10);
						}
						if (parts[2].startsWith('0')) {
							parts[2] = parseInt(parts[2], 10);
						}
						return parts.join('-');
					});

					const uniqueArray1 = array2.filter(date => !array1.includes(date));
					//chidaodates hot 热门活动
					//truancyeddates normal 普通活动
					this.chidaodates = array1
					this.truancyeddates = uniqueArray1
				}
			},

			async getRaceByDay(date) {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					shop_id: that.homeData.venue,
					date: date
				}
				let result = await index.getRaceByDay(data)
				if (result.code == 1) {
					this.ByDaydates = result.data
				}
			},

			async getPoints() {
				let params = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
				};
				let res = await personal.getPoints(params);
				if (res.code === 1) {
					this.jifen = res.data.result
				}
			},
			businessclick(item, index) {},
			// 首页购买产品展示
			async getOrderFive() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
				};
				let result = await index.getOrderFive(data);
				if (result.code == 1) {
					this.lastDataList = result.data.result
				}
			},
			// 首页组件排序
			async get_component() {
				let that = this;
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
				};
				let result = await index.get_component(data);
				if (result.code == 1) {
					this.Homelist = result.data.result
				}
			},
			goTeamDetails(item) {},
			openKind(item, index, type) {
				let _this = this
				uni.setStorageSync('id', item.id);
				uni.navigateTo({
					url: "/pages/venues/index",
				})
			},
			openTeacher() {
				uni.navigateTo({
					url: "/pages/index/coach/coachDetail",
				});
			},
			async getLocation() {
				console.log(778899)
				const [err, res] = await uni.getLocation({
					isHighAccuracy: true, // 开启地图精准定位
					type: "gcj02",
				});
			},

			async getAppletConfig() {
				let that = this;
				let data = {
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
				};
				let result = await index.index(data);
				if (result.code == 1) {
					that.homeData = result.data; // 首页完整数据
					// that.getVenusList(result.data.venues);
					that.text1 = that.homeData.notice
					that.titlename = result.data.name; // 页头标题
					that.venues_id = result.data.venue
					if (result.data.index_dialog) {
						that.beijing = result.data.index_dialog.background
					}
					that.dialog_state = result.data.dialog_state
					that.btn_left_sure = result.data.btn_left_sure
					that.btn_right = result.data.btn_right
					that.btn_left = result.data.btn_left
					// if (uni.getStorageSync('dialog_state') != 2) {
					// 	uni.setStorageSync("dialog_state", result.data.dialog_state)
					// 	that.dialog_state = uni.getStorageSync('dialog_state')
					// } 
					uni.setStorageSync("applet_icon", result.data.applet_icon);
					uni.setStorageSync("service_center", result.data.service_center);
					uni.setStorageSync("train", result.data.train);
					uni.setStorageSync("tel", result.data.tel);
					that.getTrainProductByHot()
					that.getRaceProductByHot()
					that.getUseSet()
					that.getcatelist()
					// that.getRaceDate()  //活动日历
				}
			},
			async getVenusList(venues_id) {
				let that = this;
				let data = {
					venues_id: venues_id,
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
					limit: 9,
					child: 8
				};
				let result = await index.getVenusList(data);
				if (result.code == 1) {
					//设置tab
					if (this.detail.tabList.length < 1) {
						this.detail.tabList = result.data.project;
						if (this.detail.tabList.length > 5) {
							this.detail.hiddenTab = true;
						}
					}
					that.detail.list = result.data.data;
				}
			},
			async getNewsList() {
				let that = this;
				let data = {
					weixinAppId: this.$https.weixinAppId,
					projectId: getApp().globalData.projectId,
					limit: 3,
				};
				let result = await index.getNewsList(data);
				if (result.code == 1) {
					that.newsList = result.data.data;
				}
			},
			async getIndustryInfoMore() {
				let that = this
				let data = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					mark: this.mark,
					mark_id: this.mark_id,
					page: 1,
					limit: 3
				}
				let result = await index.getIndustryInfoMore(data)
				if (result.code == 1) {
					that.newsList = result.data.result
				}
			},
			goNewsDetail(id) {
				uni.navigateTo({
					url: "/page_points/newsDetailPages/newsDetailPages?id=" + id,
				});
			},
			goNewsList() {
				// uni.navigateTo({
				// 	url: "/page_points/newsListPages/newsListPages",
				// });
				// uni.navigateTo({
				// 	url: "/page_venues/pages/venuesDetail/venuesDetail?id=" + this.homeData.venue +
				// 		'&belong=' + 'enroll' + '&menuActive=' + 8,
				// })
				uni.navigateTo({
					url: "/page_venues/pages/venuesDetail/venuesDetail?id=" + this.homeData.venue +
						'&belong=' + 'enroll' + '&menuActive=' + 8,
				})
			},
			openNotice() {
				uni.navigateTo({
					url: "/pages_other/notice/notice",
				});
			},
			//场馆详情
			StoreDetaillist(im) {
				uni.navigateTo({
					url: "/pages_other/train/train?id=" + im.id + '&train_enum_id=' + im.train_enum_id +
						'&venue_id=' + this.homeData.venue,
				});
			},
			StoreDetaillists(im) {
				let that = this
				if (im.sign_type == 'race') {
					uni.navigateTo({
						url: '/pages_other/race/race?id=' + im.id +
							'&venue_id=' +
							that.homeData.venue +
							'&cate_type=' +
							'enroll' +
							'&windows=' +
							im.windows
					})
				} else if (im.sign_type == 'detail') {
					uni.navigateTo({
						url: '/page_find/webview2?id=' + im.id
					})
				} else if (im.sign_type == 'redirect') {
					uni.navigateTo({
						url: '/page_find/webview1?outside_link_url=' + im.outside_link_url
					})
				}else if (im.sign_type == 'applet') {
					wx.navigateToMiniProgram({
						shortLink: im.outside_link_url,
						envVersion: 'release', // 根据目标环境选择 develop/trial/release
						success(res) {
							console.log("跳转成功");
						}
					});
				}else if (im.sign_type == 'ticket') {
					uni.navigateTo({
						url: '/page_venues/pages/venuesDetail/ticketModule/ticketModule?id=' + im.id +
							'&venue_name=' + '苏州市体育中心' + '&venue_id=' + '213'
					})
				}
				
				// uni.navigateTo({
				// 	url: "/pages_other/race/race?id=" + im.id + '&cate_type=' + 'enroll' + '&windows=' +
				// 		im.windows + '&venue_id=' + this.homeData.venue,
				// });
			},

			cate_list(item, e) {
				let e_num = e
				// index_style  0原本样式    1新样式
				if (this.homeData.index_style == 0) {
					uni.navigateTo({
						url: "/pages_other/menuKind/menuKind?name=" + item.name + '&e_num=' + e_num + '&windows=' +
							item.windows,
					})
				} else if (this.homeData.index_style == 1) {
					uni.navigateTo({
						url: "/page_points/venue_district/venue_district?windows=" + item.windows,
					})
				}
			},
			cate_list_item(item, index) {
				uni.navigateTo({
					url: item.path,
				})
			},
			base_List(type) {
				let that = this
				if (type == 1) {
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/venuesDetail?id=" + that.homeData.venue +
					// 		'&belong=' + 'court' + '&menuActive=' + 2,
					// })
					uni.navigateTo({
						url: "/page_venues/pages/venuesDetail/ticketDetail?id=" + that.homeData.venue +
							'&belong=' + 'court' + '&menuActive=' + 2,
					})
				} else if (type == 2) {
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/ticketBooking?id=" + that.homeData.venue +
					// 		'&belong=' + 'cooperate' + '&menuActive=' + 1,
					// })
					uni.navigateTo({
						url: "/page_venues/pages/venuesDetail/enrollBooking?id=" + that.homeData.venue +
							'&belong=' + 'enroll' + '&menuActive=' + 1,
					})
				} else if (type == 3) {
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/venuesDetail?id=" + that.homeData.venue +
					// 		'&belong=' + 'train' + '&menuActive=' + 3,
					// })
					uni.navigateTo({
						url: "/page_find/find_train/train_datail?id=" + that.homeData.venue +
							'&belong=' + 'train' + '&venues_id=' + that.homeData.venue + '&menuActive=' + 3,
					})
				} else if (type == 4) {
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/enrollBooking?id=" + that.homeData.venue +
					// 		'&belong=' + 'cooperate' + '&menuActive=' + 1,
					// })
					// 原赛事
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/enrollDetail?id=" + that.homeData.venue +
					// 		'&belong=' + 'enroll' + '&menuActive=' + 8,
					// })
					//2024/11/5修改
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/enrollBooking?id=" + that.homeData.venue +
					// 		'&belong=' + 'enroll' + '&menuActive=' + 1,
					// })
					//2024/11/5增加
					// uni.navigateTo({
					// 	url: "/page_train/venues/index?current_Tab=" + 2 + '&addsav=' + 1 + '&id' + that.homeData
					// 		.venue,
					// })
					if (that.ticketproducts.length == 0) {
						uni.navigateTo({
							url: "/page_train/venues/spindex?current_Tab=" + 2 + '&addsav=' + 1 + '&id' + that
								.homeData
								.venue,
						})
					} else {
						uni.navigateTo({
							url: "/page_train/venues/index?current_Tab=" + 2 + '&addsav=' + 1 + '&id' + that
								.homeData
								.venue,
						})
					}

				} else if (type == 5) {
					// uni.navigateTo({
					// 	url: "/page_venues/pages/venuesDetail/venuesDetail?id=" + that.homeData.venue +
					// 		'&belong=' + 'card' + '&menuActive=' + 0,
					// })
					uni.navigateTo({
						url: "../find_index/find_index",
					})
					// wx.navigateToMiniProgram({
					// 	appId: 'wx1581663debd273d5',
					// 	path: 'pages/pointExchage/pointExchage',
					// 	extraData: {
					// 		// 可选，传递给目标小程序的数据，具体格式自定义
					// 	},
					// 	envVersion: 'release', // 可选，跳转到目标小程序的版本，可选值为 develop（开发版）、trial（体验版）、release（正式版）
					// 	success(res) {
					// 		// 跳转成功的回调
					// 	},
					// 	fail(err) {
					// 		// 跳转失败的回调
					// 	}
					// });
				}
			},
			async getcatelist() {
				let that = this;
				that.courtproducts = []
				let postData = {
					project_id: getApp().globalData.projectId,
					app_id: this.$https.weixinAppId,
					block: 'ticket_and_court',
					belong: 'court',
					cate_id: '83',
					page: 1,
					limit: 1,
				};
				let result = await venues.getShopIndex(postData);
				if (result.code === 1) {
					console.log(result, 'resultresult')
					that.ticketproducts = result.data.products.ticket
				}
			},
			Points() {
				uni.navigateTo({
					url: '/page_points/page_points/points_mall'
				})
			},
			// 个性名片分类列表
			async mingri() {
				this.showInfo = true
				let data = {
					project_id: getApp().globalData.projectId,
					venue_id: this.venues_id,
					type: this.cardtype,
					open_id: uni.getStorageSync('openid'),
					output: 'json'
				}
				let result = await subscribe.visit_cardindex(data)
				if (result.code == 1) {
					this.list4 = result.data
				}
			},

			async tabClick(item) {
				let that = this
				this.currentTab = item.index;
				this.cardtype = item.index + 1
				let type = item.index + 1
				let data = {
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
					venue_id: this.venues_id,
					type: this.cardtype,
					output: 'json'
				}
				let result = await subscribe.visit_cardindex(data)
				if (result.code == 1) {
					result.data.forEach((item, index) => {
						if (item.type == 1) {
							that.list4 = result.data
						} else if (item.type == 2) {
							that.list2 = result.data
						} else if (item.type == 3) {
							that.list3 = result.data
						}
					})
				}
			},
			async cardloist() {
				let that = this
				let data = {
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
					venue_id: this.venues_id,
					type: this.cardtype,
					output: 'json'
				}
				let result = await subscribe.visit_cardindex(data)
				if (result.code == 1) {
					result.data.forEach((item, index) => {
						if (item.type == 1) {
							that.list4 = result.data
						} else if (item.type == 2) {
							that.list2 = result.data
						} else if (item.type == 3) {
							that.list3 = result.data
						}
					})
				}
			},
			// 挂件
			async onguajian(item, index) {
				this.gjindex = index;
				// this.po40 = item.image
				this.cardtype = 2
				let that = this
				let data = {
					project_id: getApp().globalData.projectId,
					venue_id: that.venues_id,
					type: this.cardtype,
					visit_card_id: item.id,
					open_id: uni.getStorageSync('openid'),
					output: 'json'
				}
				let result = await subscribe.setDefault(data)
				if (result.code == 1) {
					this.cardloist()
					this.getUseSet()
				}
			},
			// 皮肤
			async onpifu(item, index) {
				this.pfindex = index;
				// this.msg.url = item.img
				this.cardtype = 1
				let that = this
				let data = {
					project_id: getApp().globalData.projectId,
					venue_id: that.venues_id,
					type: that.cardtype,
					visit_card_id: item.id,
					open_id: uni.getStorageSync('openid'),
					output: 'json'
				}
				let result = await subscribe.setDefault(data)
				if (result.code == 1) {
					this.cardloist()
					this.getUseSet()
				}
			},
			// 称号
			async onchenghao(item, index) {
				this.chindex = index;
				// this.icon1 = item.img
				// this.chname = item.name
				this.cardtype = 3
				let that = this
				let data = {
					project_id: getApp().globalData.projectId,
					venue_id: that.venues_id,
					type: this.cardtype,
					visit_card_id: item.id,
					open_id: uni.getStorageSync('openid'),
					output: 'json'
				}
				let result = await subscribe.setDefault(data)
				if (result.code == 1) {
					this.cardloist()
					this.getUseSet()
				}
			},
			// 获取用户的个性名片设置
			async getUseSet() {
				let that = this
				let data = {
					project_id: getApp().globalData.projectId,
					venue_id: that.venues_id,
					open_id: uni.getStorageSync('openid'),
					output: 'json'
				}
				let result = await subscribe.getUseSet(data)
				if (result.code == 1) {
					// type3称号   type2挂件  type1皮肤
					result.data.forEach((item, index) => {
						if (item.type == 1) {
							that.msg.url = item.visitCard.image_url
						} else if (item.type == 2) {
							that.po40 = item.visitCard.image_url
						} else if (item.type == 3) {
							that.chname = item.visitCard.name
							that.icon1 = item.visitCard.image_url
						}
					})
				}
			},

			async getMyCoupon() {
				let postData = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					open_id: uni.getStorageSync('openid'),
					page: 1,
					limit: 10,
					status: 0,
					venue_id: '',
					window_id: '',
				}
				let res = await market.getMyCoupon(postData);
				if (res.code == 1) {
					this.wrtotalt = res.data.result.total
				}
			},
			ondatalist4(item, index) {
				uni.navigateTo({
					url: '/pages_other/race/race?id=' + item.id +
						"&venue_name=" +
						this.homeData.name +
						'&venue_id=' +
						this.homeData.venue +
						'&cate_type=' + 'enroll' +
						'&windows=' + item.windows
				})
			},

		},
	};
</script>

<style lang="scss" scoped>
	@import url("@/static/css/index/index.css");

	.adress {
		margin-right: 20rpx;
		font-size: 28rpx;
		white-space: nowrap;
		color: white;
	}

	// 容器
	.scrollContainer {
		width: 95%;
		height: 194rpx;
		white-space: nowrap;
		margin-top: 18rpx;
	}

	// 容器项
	.scrollitem {
		display: inline-block;
		margin-left: 30rpx;
		height: 234rpx;
	}

	.scrollimage {
		width: 270rpx;
		height: 154rpx;
	}

	.recommandItemText {
		width: 270rpx;
		text-align: center;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.EmptyData {
		text-align: center;
		margin-top: 50rpx;
	}

	.team {
		position: relative;
	}

	.section_8 {
		padding: 30rpx 20rpx 25rpx;
		background-color: rgb(255, 255, 255);
		box-shadow: 0px 0px 8.9rpx 1.1rpx rgba(0, 0, 0, 0.06);
		border-radius: 10rpx;
		height: 187rpx;
		width: 327rpx;
		position: relative;
	}

	.image_1 {
		width: 80rpx;
		height: 80rpx;
	}

	.image_3 {
		width: 20rpx;
		height: 20rpx;
	}

	.image_5 {
		width: 21rpx;
		height: 20rpx;
	}

	.text_25 {
		margin-left: 2rpx;
		margin-top: 17rpx;
		align-self: flex-start;
		color: rgb(190, 190, 190);
		font-size: 22rpx;
		font-family: PingFang SC;
		line-height: 22rpx;
	}

	.group_12 {
		margin-right: 69rpx;
		align-self: center;
		float: right;
	}

	.group_14 {
		margin-top: 1rpx;
	}

	.text_22 {
		margin-bottom: 2rpx;
		color: rgb(51, 51, 51);
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 700;
		line-height: 23rpx;
	}

	.text-wrapper {
		margin-left: 10rpx;
	}

	.image_6 {
		margin-left: 8rpx;
	}

	.image_8 {
		margin-left: 7rpx;
	}

	.image_10 {
		margin-left: 8rpx;
	}

	.image_12 {
		margin-left: 7rpx;
	}

	.bblue {
		background-color: deepskyblue;
	}

	.ppink {
		background-color: rgb(239, 100, 132);
	}

	.view_9 {
		padding: 11rpx 0 1rpx;
		color: rgb(255, 255, 255);
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 700;
		line-height: 10rpx;
		border-radius: 5rpx;
		width: 29rpx;
		height: 37rpx;
		float: right;
	}

	/* 去除滚动条 */
	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
		display: none;
	}

	.section_9 {
		margin-left: 20rpx;
		padding: 57rpx 0;
		color: rgb(51, 51, 51);
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 500;
		line-height: 21rpx;
		background-color: rgb(255, 255, 255);
		/* box-shadow: 0px 0px 8.9rpx 1.1rpx rgba(0, 0, 0, 0.06); */
		border-radius: 10rpx;
		width: 60rpx;
		height: 100%;
		position: absolute; //父元素的position位置固定，这个绝
	}

	.store-popup {
		padding: 20rpx 0;

		.title {
			padding: 0px 30rpx;
			// padding-bottom: 20rpx;
			// margin-bottom: 20rpx;
			// border-bottom: 1px solid #cccccc;
			font-weight: bold;

			.clo {
				color: #4BA677;
			}
		}

		/deep/.u-tabs {
			background-color: #fff;
			// margin: 0 30rpx;

			.u-tabs__wrapper__nav__item {
				flex: 1;
			}

			.u-tabs__wrapper__nav__line {
				bottom: 0;
			}
		}

		.scrolladd {
			display: flex;
			justify-content: center;
			flex-direction: column;
			align-items: center;
			width: 100%;
			background-color: #EDF5F5;

			.data-item {
				margin-top: 20rpx;
				height: 390rpx;
				width: 710rpx;
				background-color: #ffffff;
				padding: 10rpx;
				// border: 0.1rpx linear-gradient(190deg, #FFF, #FFF) solid;
				border-radius: 12rpx;
				// box-shadow: 30px 2px 10px #f9f9f9;
				margin-top: 20rpx;
				display: flex;
				flex-direction: column;

				.image {
					// padding-left: 10rpx;
					width: 100%;
					height: 220rpx;

					/deep/ .u-fade-enter-to {
						height: 100%;
					}
				}

				.detail {
					height: 145rpx;
					width: 97%;
					margin-left: 15rpx;
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.ellipsis-1 {
						font-size: 30rpx;
						margin-bottom: 10rpx;
						font-weight: bold;
					}

					.tag-list {
						margin-bottom: 10rpx;

						.tag {
							font-size: 22rpx;
							border-radius: 6rpx;
							padding: 5rpx 10rpx;
							color: #4BA677;
							// background-color: #abc6fa;
							margin-right: 10rpx;
							border: 1rpx solid #4BA677;
						}
					}

					.tiemr {
						color: #cfcfcf;
						font-size: 22rpx;
					}

					.price {
						font-size: 36rpx;
						color: #4BA677;
						font-weight: bold;
						margin-right: 10rpx;
					}

					.price-2 {
						color: #cfcfcf;
						font-size: 22rpx;
						text-decoration: line-through;
					}
				}
			}
		}
	}

	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
	}

	.swiper {
		height: 300rpx;
	}

	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}

	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}

	.uni-common-mt {
		margin-top: 60rpx;
		position: relative;
	}

	.info {
		position: absolute;
		right: 20rpx;
	}

	.uni-padding-wrap {
		width: 550rpx;
		padding: 0 100rpx;
	}

	.uni-bg-red {
		background-color: #ffff00;
	}

	.uni-bg-green {
		background-color: #55ff00;
	}

	.uni-bg-blue {
		background-color: #ffaa00;
	}

	.not-logged-in {
		width: 619rpx;
		height: 508rpx;
		background-color: #FFFFFF;
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		z-index: 999999;
		border-radius: 10rpx;

		.title {
			font-size: 36rpx;
			font-weight: bold;
			color: #000000;
			text-align: center;
			padding-top: 43rpx;
		}

		.close {
			color: #AAAAAAFF;
			font-size: 40rpx;
			font-weight: bold;
			position: absolute;
			right: 30rpx;
			top: 20rpx;
		}

		/deep/ .u-image {
			margin: auto;
			margin-top: 52rpx;
		}

		.desc {
			font-size: 30rpx;
			color: #000000;
			font-weight: bold;
			text-align: center;
			margin-top: 20rpx;
		}

		.desc2 {
			color: #ADADADFF;
			font-size: 26rpx;
			text-align: center;
			margin-top: 18rpx;
		}

		.btns {
			display: flex;

			.btn {
				width: 50%;
				height: 100rpx;
				position: absolute;
				bottom: 0;
				right: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 34rpx;
				color: #4BA677;
				border-top: 1px solid #E6E6E6FF;
			}

			.btn2 {
				width: 50%;
				height: 100rpx;
				position: absolute;
				bottom: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 34rpx;
				color: #000;
				border-top: 1px solid #E6E6E6FF;
			}
		}
	}
</style>